<!DOCTYPE html>
<html>
<body>
<embed id="plugin" type="application/x-webkit-test-webplugin" accepts-touch="raw" print-user-gesture-status="true" width="100" height="100"></embed>
<p>
  Test that the user gesture indicator is correctly set for events forwarded
  through the WebPluginContainer. The tests succeeds if the mousedown/mouseup
  event pair is a user gesture.
</p>
<script>
    if (!window.testRunner || !window.eventSender) {
        document.write("This test does not work in manual mode.");
    } else {
        testRunner.dumpAsText();
        internals.updateLayoutAndRunPostLayoutTasks();

        // Click on the plugin.
        eventSender.mouseMoveTo(20, 20);
        eventSender.mouseDown();
        eventSender.mouseUp();

        // Stray mouse up event, should get its own gesture.
        eventSender.mouseUp();
    }
</script>
</body>
</html>
